package com.ly.web.controller.erp;

import com.ly.heart.service.IKingFinancePaySettlementBillService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ly.common.core.controller.BaseController;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingFinancePaySettlementBillEntity;

import javax.annotation.Resource;

/**
 * 金蝶-财务-应付票据结算单Controller
 *
 * @author wutao
 * @date 2024-06-22
 */
@Api ( value = "KingFinancePaySettlementBill", tags = "金蝶-财务-应付票据结算单" )
@RestController
@RequestMapping ( "/heart/KingFinancePaySettlementBill" )
public class KingFinancePaySettlementBillController extends BaseController {

    @Resource
    private IKingFinancePaySettlementBillService kingFinancePaySettlementBillEntityService;

    /**
     * 查询金蝶-财务-应付票据结算单列表
     */
    @PreAuthorize ( "@ss.hasPermi('heart:KingFinancePaySettlementBill:list')" )
    @GetMapping ( "/list" )
    @ApiOperation ( "查询金蝶-财务-应付票据结算单列表" )
    public AjaxResult list ( KingFinancePaySettlementBillEntity kingFinancePaySettlementBillEntity ) {
        return kingFinancePaySettlementBillEntityService.selectKingFinancePaySettlementBillEntityList ( kingFinancePaySettlementBillEntity );
    }

    /**
     * 获取金蝶-财务-应付票据结算单详细信息
     */
    @PreAuthorize ( "@ss.hasPermi('heart:KingFinancePaySettlementBill:query')" )
    @GetMapping ( value = "/{id}" )
    @ApiOperation ( "获取金蝶-财务-应付票据结算单详细信息" )
    public AjaxResult getInfo ( @PathVariable ( "id" ) String id ) {
        return AjaxResult.success ( kingFinancePaySettlementBillEntityService.selectKingFinancePaySettlementBillEntityById ( id ) );
    }

}
